/* 导航栏样式 */
header {
    background-color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    height: 64px;
}

/* 滚动时的导航栏样式 */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.nav-hidden {
    transform: translateY(-100%);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
    line-height: 64px;
    transition: transform 0.3s ease;
    cursor: pointer;
    height: 64px;
    display: flex;
    align-items: center;
}

.logo:hover {
    transform: scale(1.05);
    color: #ff5252;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links > li > a {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    border-radius: 4px;
    position: relative;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 导航项悬停效果 */
.nav-links > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ff6b6b;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links > li > a:hover::before,
.nav-links > li > a.active::before {
    width: 80%;
}

/* 登录和管理按钮样式 */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
}

.login-btn, .admin-btn {
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.login-btn {
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    background-color: transparent;
}

.login-btn:hover {
    background-color: #ff6b6b;
    color: #fff;
    transform: translateY(-1px);
}

.admin-btn {
    background-color: #ff6b6b;
    color: #fff;
    margin-left: 8px;
}

.admin-btn:hover {
    background-color: #ff5252;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        display: none;
    }

    nav {
        position: relative;
    }

    /* 添加一个汉堡菜单按钮 */
    .nav-toggle {
        display: block;
        font-size: 1.5rem;
        background: none;
        border: none;
        color: #333;
        cursor: pointer;
    }
} 

/* 下拉菜单容器 */
.nav-dropdown {
    position: relative;
}

/* 下拉菜单内容 */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--surface-color);
    min-width: 120px;
    box-shadow: 0 4px 20px rgba(255, 140, 100, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform-origin: top;
    transition: all 0.3s ease;
    margin-top: 0.8rem;
    border: 1px solid rgba(255, 200, 180, 0.3);
    z-index: 1000;
}

/* 下拉菜单触发效果 */
.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
}

/* 添加小三角形 */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: var(--surface-color);
    border-left: 1px solid rgba(255, 200, 180, 0.3);
    border-top: 1px solid rgba(255, 200, 180, 0.3);
}

/* 添加分隔线 */
.dropdown-content a:not(:last-child) {
    border-bottom: 1px solid rgba(255, 200, 180, 0.2);
}

/* 下拉菜单项样式 */
.dropdown-content a {
    display: block;
    padding: 0.6rem 1rem;
    color: #333;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    position: relative;
    z-index: 1;
}

.dropdown-content a:hover {
    background-color: rgba(255, 140, 100, 0.1);
    color: rgba(255, 140, 100, 0.9);
    padding-left: 1.5rem;
}

/* 当前激活的菜单项 */
.dropdown-content a.active {
    background-color: rgba(255, 140, 100, 0.15);
    color: rgba(255, 140, 100, 0.9);
    font-weight: 600;
}

/* 添加悬停时的图标 */
.dropdown-content a:hover::before {
    content: '→';
    position: absolute;
    left: 0.5rem;
    opacity: 0;
    animation: slideIn 0.3s forwards;
    color: rgba(255, 140, 100, 0.9);
}

@keyframes slideIn {
    to {
        opacity: 1;
    }
}

/* 添加小箭头指示器 */
.nav-dropdown > a::after {
    content: '▾';
    display: inline-block;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
    font-size: 0.7em;
    opacity: 0.7;
}

.nav-dropdown:hover > a::after {
    transform: rotate(180deg);
}

/* 添加下拉菜单出现动画 */
@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

.nav-dropdown:hover .dropdown-content {
    animation: dropdownFade 0.3s ease forwards;
}

/* 修改导航栏激活状态样式 */
.nav-links a.active {
    color: #ff6b6b;
}

/* 导航项悬停和激活效果 */
.nav-links > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ff6b6b;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links > li > a:hover::before,
.nav-links > li > a.active::before {
    width: 80%;
}

/* 下拉菜单项激活状态 */
.dropdown-content a.active {
    background-color: rgba(255, 140, 100, 0.15);
    color: rgba(255, 140, 100, 0.9);
    font-weight: 600;
}

/* 统一页面内容的顶部间距 */
body {
    padding-top: 64px;
    margin: 0;
} 